package com.woniu.goods.config;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.ViewControllerRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

/**
 * 功能描述:<br>
 * 〈〉
 *
 * @author wugd
 * @create 2021/1/29
 * @since 1.0.0
 */

@Configuration

//配置别名 视图解析器
public class WebMvcConfig {
    @Bean
    public WebMvcConfigurer webMvcConfigurer(){

        return new WebMvcConfigurer() {
            @Override
            public void addViewControllers(ViewControllerRegistry registry) {
                registry.addViewController("/login.html").setViewName("login");
                registry.addViewController("/main.html").setViewName("main");
                registry.addViewController("/unauthority.html").setViewName("unauthority");
                registry.addViewController("/tree.html").setViewName("tree");
                registry.addViewController("/order.html").setViewName("order");
            }
        };
    }

}
